﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BankSystem
{
    class Account
    {
        private int accountNumber;
        private int moneyValue;

        public Account(int accountNumber, int moneyValue)
        {
            this.accountNumber = accountNumber;
            this.moneyValue = moneyValue;
        }
               
        public int GetAccountNumber()
        {
            return accountNumber;
        }

        public double GetMoneyAmount()
        {
            double moneyAmount = (double)moneyValue / 100.0;
            return moneyAmount;
        }

        public bool TakeMoney(double amount)
        {
            int cents = (int)(amount * 100);
            if (cents <= moneyValue)
            {
                moneyValue -= cents;
                return true;
            }
            return false;
        }

        public bool PutMoney(double amount)
        {
            int cents = (int)(amount * 100);
            moneyValue += cents;
            return true;
        }

    }
}
